<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#example').dataTable( {
			"sScrollY": "800px",
			"bPaginate": false,
			"bScrollCollapse": true
		} );
	});
</script>

<script type="text/javascript">
	$(document).ready(function() {
	});

	function laporan(pageURL, title,w,h){

		var periode_awal=document.getElementById('tanggal_awal').value;

		var periode_akhir=document.getElementById('tanggal_akhir').value;

		if ((periode_awal=='')||(periode_akhir=='')){

			alert('Isilah periode awal dan akhir');

		}else{

			var left = (screen.width/2)-(w/2);

			var top = (screen.height/2)-(h/2);

			var targetWin = window.open ('<?=site_url();?>/mcm/view_lap_biaya_periode/'+periode_awal+'/'+periode_akhir, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);

			

			document.getElementById('tanggal_awal').value='';

			document.getElementById('tanggal_akhir').value='';

		}
	}

	

	$(function(){

		$("#tanggal_awal").datepicker({dateFormat: 'yy-mm-dd' });

	})	

	

	$(function(){

		$("#tanggal_akhir").datepicker({dateFormat: 'yy-mm-dd' });

	})	

	

		

	function klick_tanggal_awal(){

		var tanggal = document.getElementById("tanggal_awal");

		tanggal.focus();

	}

	

	function klick_tanggal_akhir(){

		var tanggal = document.getElementById("tanggal_akhir");

		tanggal.focus();

	}

	

	function batal2(){

		//document.location.href="<?=site_url();?>/mcm";
		
		$.fancybox.close();
	}

	

</script>


	<?php 
		if(validation_errors())
		{
	?>
			<ul class="message error grid_12">
				<li><?=validation_errors()?></li>
				<li class="close-bt"></li>
			</ul>	
	<?php
		} 
	?>
<div id="page-heading"><h1>Mandiri Cash Management Verifikasi Data</h1></div>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
<tr>
	<th rowspan="3" class="sized"><img src="<?php echo base_url() ?>asset/admin/images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
	<th class="topleft"></th>
	<td id="tbl-border-top">&nbsp;</td>
	<th class="topright"></th>
	<th rowspan="3" class="sized"><img src="<?php echo base_url() ?>asset/admin/images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
</tr>
<tr>
	<td id="tbl-border-left"></td>
	<td> 
		<div id="content-table-inner">
		<div id="table-content">
		<table border="0" width="100%" cellpadding="0" cellspacing="0">
		
		<tr valign="top">
			<td>			
			
					<div id="step-holder">
						<div class="step-no">1</div>
						<div class="step-light-left">
							<?php 
								echo anchor('mcm/index', 'List Data MCM');
							?>
						</div>
						<div class="step-light-right">&nbsp;</div>
						<div class="step-no">2</div>
						<div class="step-light-left">
							<?php  
								echo anchor('mcm/insert', 'Tambah Data');
							?>
						</div>
						<div class="step-light-right">&nbsp;</div>
						<div class="step-no">3</div>
						<div class="step-dark-left">
							<?php  
								echo anchor('mcm/verifikasi', 'Verifikasi Data');
							?>
						</div>
				<!--					
					<div class="step-light-right">&nbsp;</div>
						<div class="step-no">4</div>
						<div class="step-light-left">
							<?php  
								echo anchor('mcm/list_posting', 'Posting Data');
							?>
						</div>
						<div class="step-light-right">&nbsp;</div>
						<div class="step-no">5</div>
						<div class="step-light-left">
							<?php
								echo anchor('mcm/report_form', 'Ekspor Data');
							?>
						</div>
				-->
						<div class="step-dark-round">&nbsp;</div>
											
						<div class="clear"></div>
					</div>
			
				<!--
			<br/> <br/> <br/> <br/> 
			<table border="0" cellpadding="0" cellspacing="0"  id="id-form"  >
			<?php 
			$attributes = array('name' => 'form1', 'id' => 'form1', 'class'=>'block-content form');
			echo form_open_multipart('mcm/verifikasi', $attributes);
			?>	 
		
			<tr>
				<td colspan="2">	  
				<div class="columns">
				<input type="hidden" name="id_biaya" id="id_biaya" value="<?=date('YmdHis')?>">
				<p class="colx2-left">
					<label for="complex-en-url">Periode :</label>
					<span class="relative">
						<span class="input-type-text margin-right relative">
						<input type="text" name="periode_awal" id="tanggal_awal" class="datepicker">  
						<img onclick="javascript:klick_tanggal_awal()" src="<?=base_url()?>asset/admin/images/icons/fugue/calendar-month.png" width="16" height="16">
						</span>
					</span>
					S/D
					<span class="relative">
						<span class="input-type-text margin-right relative">
						<input type="text" name="periode_akhir" id="tanggal_akhir" class="datepicker">  
						<img onclick="javascript:klick_tanggal_akhir()" src="<?=base_url()?>asset/admin/images/icons/fugue/calendar-month.png" width="16" height="16">
						</span>
					</span>
				</p>
				</div> 
				</td>
			</tr>
			<tr>			 
				<td class="noheight" colspan="2" align="right">	
					<input type="submit" value="View" class="form-submit" />
					<input type="reset" value="Batal" class="form-reset" onclick="javascript:batal();" />
				</td>	
			</tr>
			</form>
			</table> 
			
			
			<br/> <br/> 
			<hr size="2"/>
			<br/> <br/> 
			-->
			<?php 
				$attributes = array('name' => 'form1', 'id' => 'form1', 'class'=>'block-content form');
				echo form_open_multipart('mcm/process_update', $attributes);
			?>
			<!--
			<table align="right" border="0"  cellpadding="0" cellspacing="0"   >
					<tr>
						<td align="right" colspan="7">
							<input type="submit" value="Simpan" class="form-submit" />
							<input type="reset" value="Batal" class="form-reset" onclick="javascript:batal();" />
						</td>
					</tr>
			</table>
			-->
			<br/><br/>
				<table border="0" width="100%" cellpadding="0" cellspacing="0" class="display" id="example">
				<thead>
					<tr>										
						<th class="table-header-repeat line-left minwidth-0" style="text-align: center"><a href="">No.</a></th> 
						<th class="table-header-repeat line-left minwidth-1"><a href="">Tanggal</a></th>				 				
						<th class="table-header-repeat line-left minwidth-0"><a href="">Rincian Transaksi</a></th>	
						<!--<th class="table-header-repeat line-left minwidth-1"><a href="">Uraian</a></th>  -->
						<th class="table-header-repeat line-left minwidth-1" style="text-align: center"><a href="">Debet</a></th>	
						<th class="table-header-repeat line-left minwidth-1" style="text-align: center"><a href="">Kredit</a></th>							
						<th class="table-header-repeat line-left minwidth-1" style="text-align: center"><a href="">Aksi</a></th>	  				
					</tr>
				</thead>
				<tbody>
				 <? //echo "<input type='hidden' name='count_result'  id='count_result' value='".$count_result ."'>"?> 
				<?php 
				$i=0;
				foreach($results->result() as $row) 
				{
				$i++;
				?>
					<tr class="alternate-row">
						<td align="left" valign="top">
							<?=$i + $param3?> <?//echo  "";?>
							<?//=$row->id?> 
							<? echo "<input type='hidden' name='id'  id='id' value='".$row->id ."'>"?>  
							<? echo "<input type='hidden' name='id_mcm'  id='id_mcm' value='".$row->id_mcm ."'>"?>
						</td>
						<td align="left" valign="top">
							 <?php 
								$tgl1=$tanggal 	= date('d-M-Y H:i:s', strtotime($row->tanggal));  
							?> 
							<?=$tgl1?> 
							<? echo "<input type='hidden' name='tanggal'  id='tanggal' value='".$row->tanggal ."'>"?>
						</td>
						<td align="left" valign="top">
							<?=$row->rincian_transaksi?>  
							<? echo "<input type='hidden'   name='rincian_transaksi'  id='rincian_transaksi' value='".$row->rincian_transaksi."'>"?>
						</td> 
						<!--
						<td align="left" valign="top">
							<?//=$row->uraian?>  
							<? //echo "<textarea  cols='15' rows='3' name='uraian'  id='uraian' >".$row->uraian ."</textarea>"?>
						</td>
						-->
						<td align="right" valign="top">
							<?=convert_rupiah_non_rp($row->debet)?> 
							<? echo "<input type='hidden' style='text-align:right' name='debet'  id='debet' value='".$row->debet ."' readonly='readonly' >";?>  
						</td> 
						<td align="right" valign="top">
							<?=convert_rupiah_non_rp($row->kredit)?> 
							<? echo "<input type='hidden' style='text-align:right' name='kredit'  id='kredit' value='".$row->kredit ."' readonly='readonly' >";?>  
						</td> 
									 
						<!-- 
						<td align="left" valign="top">
						
							<select <? echo " name='pendapatan' id='pendapatan' "?> >
								 
									<?
									if($row->status == 'posting')
									{ 
										$sql = mysql_query("SELECT * from master_akun where AKUNID like '4%' and AKUNID = $row->pendapatan ORDER BY AKUNID ASC");
										while($p=mysql_fetch_array($sql))
										{
											$sel = ($p['AKUNID'] == $row->pendapatan)? "selected" : "";
											echo "<option value=\"".$p['AKUNID']."\" $sel>".$p['NAKUN']."</option>";
										}
										 
									} 
									else
									{
										echo "<option  value=''>--Pilih Kategori--</option>";
										$sql = mysql_query("SELECT * from master_akun where AKUNID like '4%' ORDER BY AKUNID ASC");
										while($p=mysql_fetch_array($sql))
										{
											$sel = ($p['AKUNID'] == $row->pendapatan)? "selected" : "";
											echo "<option value=\"".$p['AKUNID']."\" $sel>".$p['NAKUN']."</option>";
										}
									}
									?>
							</select>
							
							<?=$row->pendapatan?> 
							
						</td> 
						-->
						
						
						<!--
						<td align="left" valign="top">
						<div  id="parawaba"  >
							<select <? echo " name='parawaba' id='parawaba' "?> >
									<?
									if($row->status == 'posting')
									{ 
										if(($row->parawaba == '0')or($row->parawaba == ''))
										{ 
											echo "<option  value='0'>--Pilih Parawaba--</option>";
											$sql = mysql_query("SELECT * FROM master_parawaba ORDER BY nama ASC");
											while($p=mysql_fetch_array($sql))
											{
												$sel = ($p['id'] == $row->parawaba)? "selected" : "";
												echo "<option value=\"".$p['id']."\" $sel>".$p['nama']."</option>";
											}
										}
										else
										{
											$sql = mysql_query("SELECT * FROM master_parawaba where id = $row->parawaba");
											while($p=mysql_fetch_array($sql))
											{
												$sel = ($p['id'] == $row->parawaba)? "selected" : "";
												echo "<option value=\"".$p['id']."\" $sel>".$p['nama']."</option>";
											}
										}
									} 
									else
									{
										echo "<option  value='0'>--Pilih Parawaba--</option>";
										$sql = mysql_query("SELECT * FROM master_parawaba ORDER BY nama ASC");
										while($p=mysql_fetch_array($sql))
										{
											$sel = ($p['id'] == $row->parawaba)? "selected" : "";
											echo "<option value=\"".$p['id']."\" $sel>".$p['nama']."</option>";
										}
									}
									?>
							</select>
							
							</div>	
							<?=$row->parawaba?> 
						</td> 
						 -->
						 
						 
						 
						<td align="center" valign="top">
							 
							<?//=$row->status?> 
							<?
									//if($row->status == 'posting')
									//{ 
									//	 echo $row->status;
									//} 
									//else
									//{
									?>
										<script>
									 
										var counter = 0;
										
										$(document).ready(function(){
										counter=counter+1;
										
										$("#getakun"+counter).fancybox({ 
											'autoDimensions': true,
											'autoScale'     : true,
											'transitionIn'  : 'elastic',
											'transitionOut' : 'elastic',
										});
										}); 
										</script>
										<a id="getakun<?=$i;?>" href="<?=base_url().'index.php/mcm/verifikasi_detail/'.$row->id?>">[Verifikasi]</a>
											
									<? 
									//}
							?>
						</td> 
						 
					</tr>
				<?php  } ?>	
				</tbody> 
				</table> 
				<!--
				<table align="right" border="0"  cellpadding="0" cellspacing="0"   >
					<tr>
						<td align="right" colspan="7">
							<input type="submit" value="Simpan" class="form-submit" />
							<input type="reset" value="Batal" class="form-reset" onclick="javascript:batal();" />
						</td>
					</tr>
				</table>
				-->
				</form>		
		</div>
		</td>
		</tr> 		 
	</div> 
	</td>
</tr>
</table>
 
		<!--  start paging..................................................... -->
			<table border="0" cellpadding="0" cellspacing="0" id="paging-table">
			<tr>
			<td>
			 
				<?php echo $this->pagination->create_links(); ?>
			</td>
			<td>  
				
			</td>
			</tr>
			</table>
			<!--  end paging................ -->
		
<div class="clear"></div>
 
</div>
</div>	
</td>
<td id="tbl-border-right"></td>
</tr>
<tr>
	<th class="sized bottomleft"></th>
	<td id="tbl-border-bottom">&nbsp;</td>
	<th class="sized bottomright"></th>
</tr>
</table>
 


			